Skip to content

Friend Request

Friend requests can be sent from/received by other Schoology users in your network. You can view a list of pending requests and update (accept or deny) pending requests. For listing, you can specify the query key created_offset to view only requests that were created after the specified time (any format PHP's strtotime can interpret), for example: /users/{user id}/requests/friends?created_offset=2010-05-14+22:23:00.

NOTE

Friend Requests exist in users.

Fields

FieldNameDescriptionType
requester_idRequester IDThe user ID of the user making the requestinteger
requester_nameRequester NameThe display name of the user making the requeststring
picture_urlPicture URLThe full URL of the profile picture of the requesting userstring
school_nameSchool NameThe school of the requesting userstring
school_idSchool IDThe ID of the school of the requesting userstring
createdDate CreatedThe unix timestamp when the request was createdstring

GET users/{user id}/requests/friends

View a list of pending requests

Parameters

  • created_offset — Filter to requests created after the specified time (any format PHP's strtotime accepts). Example: 2010-05-14+22:23:00

Return A list of friend request objects

json
{
  "request": [
    {
      "id": "39095",
      "requester_id": "5",
      "created": "1389714992",
      "requester_name": "Dr. Shaw",
      "picture_url": "http:\/\/...",
      "school_name": "Washington University",
      "school_id": "170"
    }
  ]
}
xml
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <request>
        <id>39095</id>
        <requester_id>5</requester_id>
        <created>1389714992</created>
        <requester_name>Dr. Shaw</requester_name>
        <picture_url>http:\/\/...</picture_url>
        <school_name>Washington University</school_name>
        <school_id>170</school_id>
    </request>
</result>

PUT users/{user id}/requests/friends/{request id}

Update a pending request. The request_action field value must be a string with value accept or deny.

Content An object containing a request_action field

json
{
  "request_action": "accept"
}
xml
<request>
  <request_action>accept</request_action>
</request>